{include file="common/header"}
<style>
   
    .table-responsive .cap-center th,.table-responsive table tbody td{
        text-align: center !important;
    }
    /*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
    ::-webkit-scrollbar
    {
        height: 8px;
        background-color: #F5F5F5;
    }
    /*定义滚动条轨道 内阴影+圆角*/
    ::-webkit-scrollbar-track
    {
        border-radius: 3px;
    }
    /*定义滑块 内阴影+圆角*/
    ::-webkit-scrollbar-thumb
    {
        border-radius: 3px;
    }
    
</style>
<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox">
                    <div class="ibox-title">
                        <h5>用户列表</h5>
                    </div>
                    <div class="ibox-content">
                        <div class="row" style="margin-bottom: 15px;">
                            <div class="col-sm-12">
                                <div class="input-group col-sm-12">
                                    <form method="get" action="" class="pull-left" style="">
                                        <input type="hidden" name="p" value="1" title="分页次页搜索需要">
                                        <input type="text" name="user_name" value="<?php if(isset($_GET['user_name']) && $_GET['user_name']){echo $_GET['user_name'];} ?>" placeholder="用户名" class="input-sm form-control " style="width:55%;font-size:12px;" >
                                        <span class="input-group-btn pull-left">
                                            <button type="submit" class="btn btn-sm btn-primary search-btn"> 搜索</button>
                                        </span>
                                    </form>
                                    <div  style=""  class="pull-left">
                                     <button type="button" style="margin-left: 10px;" onclick="javascript:window.location.href = '/Admin/Member/member_list';" class="btn btn-danger btn-sm  reset-btn pull-left">刷新</button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="tab-content">
                            <div class="alert alert-warning">
                                <b>提示：</b>共找到<b> <?php echo $count; ?> </b>个用户
                            </div>
                            <div id="tab-1" class="tab-pane active">
                                <div class="full-height-scroll">
                                    <div class="table-responsive">
                                        <table class="table table-striped table-hover">
                                            <tbody>
                                                <tr class="cap-center">
                                                    <td>序号</td>
                                                    <td>头像</td>
                                                    <td>用户名</td>
                                                    <td>余额（元）</td>
                                                    <td>直推人数</td>
                                                    <td>间推人数</td>
                                                    <!-- <td>操作</td> -->
                                                </tr>
                                                <?php foreach($res as $k => $v): ?>
                                                <tr>
                                                    <td><?php echo ++ $page['firstRow']; ?></td>
                                                    <td><img style="width:50PX;" src="<?php echo $v['user_img']; ?>" alt=""></td>
                                                    <td><?php echo $v['user_name']; ?></td>
                                                    <td><?php echo $v['yu_e']; ?></td>
                                                    <td><?php echo $v['zhi_ren']; ?></td>
                                                    <td><?php echo $v['jian_ren']; ?></td>
                                                    <!-- 
                                                    <td>
                                                        <a href="javascript:deleteContent(<?php echo $v['user_id']; ?>);"><span class="label label-primary">已处理</span></a>
                                                    </td> -->
                                                </tr>
                                                <?php endforeach; ?>
                                            </tbody>
                                        </table>
                                    </div>
                                    <tfoot>
                                        <tr>
                                            <td colspan="12">
                                                <div class="b-page">
                                                    <?php echo $page['page']; ?>
                                                </div>
                                            </td>
                                        </tr>
                                    </tfoot>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</body>
<script>

    function showDetail(content){
        swal({ 
          title: "",
          text: "<h4>"+content+"</h4>", 
          html: true 
        });
    }

    var flog2 = false;
    function deleteContent(id){
        swal({
            title: "确认已处理反馈信息吗？",
            text: "谨慎操作",
            type: "warning",
            showCancelButton: true,
            confirmButtonColor: "#DD6B55",
            confirmButtonText: "确认处理",
            cancelButtonText: "考虑一下",
            closeOnConfirm: false,
            closeOnCancel: true
        },
        function(isConfirm) {
            if (isConfirm) {
                if (flog2) {
                    return;
                }
                flog2 = true;
                $.post('/Admin/Member/read_fk',{id:id},function(d){
                    flog2 = false;
                    if(d.error)
                    {
                        swal(d.msg, "", "error");
                        return false;
                    }else{
                        swal(d.msg, "", "success");
                        setTimeout("window.location.reload();",1000);
                    }
                },'json');
            }
        });
        
    }
</script>
{include file="common/footer"}